package com.hc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 权限
 *
 * @author 梁云亮
 */
@ApiModel(value = "Domain:Permission")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_permission")
public class Permission implements Serializable {
    private static final long serialVersionUID = 4789932547974595911L;
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "编号")
    private Integer id;

    /**
     * 权限标题
     */
    @TableField(value = "name")
    @ApiModelProperty(value = "权限标题")
    private String name;

    /**
     * 类型：1目录，2菜单，3按钮
     */
    @TableField(value = "type")
    @ApiModelProperty(value = "类型：1目录，2菜单，3按钮")
    private Integer type;

    /**
     * 权限关键字
     */
    @TableField(value = "code")
    @ApiModelProperty(value = "权限关键字")
    private String code;

    /**
     * 权限所能访问的资源的路径
     */
    @TableField(value = "url")
    @ApiModelProperty(value = "权限所能访问的资源的路径")
    private String url;

    /**
     * 权限所对应的图标
     */
    @TableField(value = "icon")
    @ApiModelProperty(value = "权限所对应的图标")
    private String icon;

    /**
     * 排序值（默认是50）
     */
    @TableField(value = "level")
    @ApiModelProperty(value = "排序值（默认是50）")
    private Integer level;

    /**
     * 是否展开：0关闭  1展开
     */
    @TableField(value = "is_opened")
    @ApiModelProperty(value = "是否展开：0关闭  1展开")
    private Boolean isOpened;

    /**
     * 父权限ID，根节点的父权限为空
     */
    @TableField(value = "pid")
    @ApiModelProperty(value = "父权限ID，根节点的父权限为空")
    private Integer pid;

    /**
     * 启用状态：0禁用  1启用
     */
    @TableField(value = "status")
    @ApiModelProperty(value = "启用状态：0禁用  1启用")
    private Boolean status;

    /**
     * 备注信息
     */
    @TableField(value = "info")
    @ApiModelProperty(value = "备注信息")
    private String info;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

}
